<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="/directorID/templateDirectorID.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreatePersonaEvaluadorTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            
            <script type="text/javascript">
                $(function(){
                    $(".codigoPerfil option[value!='4']").remove();
                });
            </script>
            
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form id="crPer">
                <h:panelGrid columns="2">
                    
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_cedula}" for="cedula" />
                    <h:inputText id="cedula" value="#{personaController.selected.cedula}" title="#{bundle.CreatePersonaTitle_cedula}" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_cedula}"/>
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_contrasennia}" for="contrasennia" />
                    <h:inputText id="contrasennia" value="#{personaController.selected.contrasennia}" title="#{bundle.CreatePersonaTitle_contrasennia}" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_contrasennia}"/>
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_nombres}" for="nombres" />
                    <h:inputText id="nombres" value="#{personaController.selected.nombres}" title="#{bundle.CreatePersonaTitle_nombres}" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_nombres}"/>
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_apellidos}" for="apellidos" />
                    <h:inputText id="apellidos" value="#{personaController.selected.apellidos}" title="#{bundle.CreatePersonaTitle_apellidos}" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_apellidos}"/>
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_direccion}" for="direccion" />
                    <h:inputText id="direccion" value="#{personaController.selected.direccion}" title="#{bundle.CreatePersonaTitle_direccion}" />
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_telefono}" for="telefono" />
                    <h:inputText id="telefono" value="#{personaController.selected.telefono}" title="#{bundle.CreatePersonaTitle_telefono}" />
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_sexo}" />
                    <h:selectOneListbox title="#{bundle.CreatePersonaTitle_sexo}" value="#{personaController.selected.sexo}" size="1" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_sexo}"> 
                        <f:selectItem itemLabel="----"/>
                        <f:selectItem itemValue="M" itemLabel="Masculino"/>
                        <f:selectItem itemValue="F" itemLabel="Feminino"/>
                    </h:selectOneListbox>
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_movil}" for="movil" />
                    <h:inputText id="movil" value="#{personaController.selected.movil}" title="#{bundle.CreatePersonaTitle_movil}" />
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_correo}" for="correo" />
                    <h:inputText id="correo" value="#{personaController.selected.correo}" title="#{bundle.CreatePersonaTitle_correo}" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_correo}"/>
              
                    <h:outputLabel value="#{bundle.CreatePersonaLabel_codigoPerfil}" for="codigoPerfil" />
                    <h:selectOneMenu id="codigoPerfil" styleClass="codigoPerfil" value="#{personaController.paraBuscarPerfil}" title="#{bundle.CreatePersonaTitle_codigoPerfil}" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_codigoPerfil}" >
                        <f:selectItems value="#{perfilController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>  
                    
                  
                </h:panelGrid>  
<!--                Evaluador -->
                <h:panelGrid columns="2" styleClass="pEvaluador">
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_tituloEstudios}" for="tituloEstudios" />
                    <h:inputText id="tituloEstudios" value="#{personaController.tituloEstudios}" title="#{bundle.CreateEvaluadorTitle_tituloEstudios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_tituloEstudios}"/>
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_otrosEstudios}" for="otrosEstudios" />
                    <h:inputText id="otrosEstudios" value="#{personaController.otrosEstudios}" title="#{bundle.CreateEvaluadorTitle_otrosEstudios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_otrosEstudios}"/>
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_experienciaAnnios}" for="experienciaAnnios" />
                    <h:inputText id="experienciaAnnios" value="#{personaController.experienciaAnnios}" title="#{bundle.CreateEvaluadorTitle_experienciaAnnios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_experienciaAnnios}"/>
                   
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_codigoNivelEstudios}" for="codigoNivelEstudios" />
                    <h:selectOneMenu id="codigoNivelEstudios" value="#{personaController.paraEditarNivelEstudios}" title="#{bundle.CreateEvaluadorTitle_codigoNivelEstudios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_codigoNivelEstudios}">
                        <f:selectItems value="#{nivelEstudiosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>

                <br />
                <h:commandLink action="#{personaController.createEvaluador}" value="#{bundle.CreatePersonaSaveLink}" />
                <br />
                <br />              
                <h:commandLink value="#{bundle.CreatePersonaIndexLink}" action="#{personaController.prepareList}" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
